from ultralytics import YOLO
#加载了预训练模型,yolov8n.pt,模型最小。
model = YOLO("weights/yolov8n.pt") # 加载预训练模型
results = model.train(task="detect",
                      data="fire_smoke.yaml" , 
                      imgsz=640, 
                      epochs=200, 
                      patience=0, 
                      batch=16,  
                      device= "cpu", 
                      workers=0)
